package base.day17.innerclass;

public class TestLambda2 {
    public static void main(String[] args) {
        useStringHandler(new StringHandler() {
            @Override
            public void print(int a) {
                System.out.println("匿名内部类中的a--"+a);
            }
        });
        useStringHandler((int a)-> System.out.println("lambda中的a--"+a));
    }
    public static void useStringHandler(StringHandler stringHandler){
        stringHandler.print(3);
    }
}
interface StringHandler{
    void print(int a);
}
